package top.tangyh.lamp.care.vo.save;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import top.tangyh.lamp.care.entity.BGenItemDetail;

import java.io.Serializable;
import java.util.List;

@Data
@Schema(description = "通用项目配置存储参数")
public class GenItemSaveParam implements Serializable {
	@Schema(description = "系统主键")
	@TableId(type= IdType.AUTO)
	private Long id;
	@Schema(description = "模块编号 说明：入量--crl-in, 护理操作--care, 出量--crl-out",requiredMode = Schema.RequiredMode.REQUIRED)
	@NotBlank(message = "模块编号不能为空")
	private String modelCode;

	@Schema(description = "项目编码",requiredMode = Schema.RequiredMode.REQUIRED)
	@NotBlank(message = "项目名称不能为空")
	private String itemCode;

	@Schema(description = "项目名称",requiredMode = Schema.RequiredMode.REQUIRED)
	@NotBlank(message = "项目名称不能为空")
	private String itemName;

	@Schema(description = "项目值类型，enum，text",requiredMode = Schema.RequiredMode.REQUIRED)
	@NotBlank(message = "项目值类型不能为空")
	private String itemValueType;

	@Schema(description = "是否全局，说明： 0否1是，默认0")
	private Integer isSys;

	@Schema(description = "病人识别号,说明：全局时 其值为null")
	private String patientIdent;

	@Schema(description = "病人住院号", required = false)
	private String hospitalNumber;

	@Schema(description = "是否逻辑删除 0-否，1-是，默认是0")
	private Integer isDeleted;

	@Schema(description = "是否可见 0-否，1-是，默认是1")
	private Integer isVisible;

	@Schema(description = "排序")
	private Long orderNo;

	@Schema(description = "备注")
	private String remark;

	@Schema(description = "在出入量是否默认可见 0-否，1-是，默认是0")
	private Integer isShowIo;

	@Schema(description = "是否个配置到所有病人 1 是 0 否")
	private Integer isGeneral;

	@Valid
	private List<BGenItemDetail> detail;

}